<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/18/018
 * Time: 15:44
 */

namespace app\api\model;


class VideoPostModel extends BaseModel
{
    protected $hidden = [
        'post_status','create_time','update_time','delete_time'];

    //获取文章条数
    public static function getMostVideo( $count )
    {
        $videos = self::limit($count)
            ->where('post_status','=','1')
            ->select();
        return $videos;
    }

    //获取视频详情
    public static function getVideoDetail( $id )
    {
        $detail = self::where('id','=',$id)
                 ->find();
        return $detail;
    }
}